@include("home.layouts.header")
@if ($banner_list)
    <div class="ban_innder" style="background-image: url({{ $banner_list[0] }});">
        <div class="wp">
            <div class="txt">
                {{ $category['class_name'] }}
            </div>
        </div>
    </div>
@endif
<!-- 内页banner end -->
<script src="//unpkg.com/layui@2.9.11/dist/layui.js"></script>
<div class="main">
    <div class="wp">
        <!-- 新闻 -->
        <ul class="ul-news1">
            @foreach($list['data'] as $key=>$val)
                <li> <a href="/business/detail?id={{ $val['id'] }}">
                        <div class="pic">
                            <img src="{{ $val['images'][0] }}" alt="">
                            <div class="time">
                                <em id="time_em">{{ date("m月", strtotime($val['created_at'])) }}</em>
                                <span id="time_span">{{ date("d日", strtotime($val['created_at'])) }}</span>
                            </div>
                        </div>
                        <div class="txt">
                            <h3>{{ $val['title'] }} 发布时间：{{ date("Y年m月d日", strtotime($val['created_at'])) }}</h3>
                            <p>　{!! substr(strip_tags($val['content']), 0, 50) !!}</p>
                            <span class="btn"></span>
                        </div> </a>
                </li>
            @endforeach
        </ul>
        <!-- 新闻-end -->
        <!-- 分页 -->
        <ul class="g-pages" id="g-pages">
            <li><a href="{{ $list['first_page_url'] }}" class="page-prev">&lt;</a></li>
            <li class="on"><a>1</a></li>
            @if ($list['total'] > $list['per_page'])
                @for($i=2;$i<=$list['last_page'];$i++)
                    <li><a href="/news/index?page={{ $i }}">{{ $i }}</a></li>
                @endfor
            @endif
            <li><a href="{{ $list['next_page_url'] }}" class="page-next">&gt;</a></li>
        </ul>
        <!-- 分页end -->
    </div>
</div>

<!-- 底部 end -->
<link rel="stylesheet" href="/static/css/slick.css">
<script src="/static/js/slick.min.js"></script>
<script>
    $(function() {
        $('.banner').slick({
            dots: true,
            slidesToShow: 1,
            autoplay: true,
            autoplaySpeed: 3000,
            fade: true,
            arrows: false,
            speed: 500,
            cssEase: 'linear'
        });

    })
</script>
<!-- 底部 -->
@include("home.layouts.footer")